home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_04 / 2n04036b < prev    next >
Text File  |  1991-02-16  |  493b  |  22 lines

  1.  
  2. /*
  3.  * boot(): function to warm or cold boot the system from software
  4.  *
  5.  * C Calling sequence:
  6.  *    boot (int flag);
  7.  * where flag is 0 perform a warm boot, or anything
  8.  * to perform a cold boot.
  9.  */
  10.  
  11. void boot(int flag)
  12. {
  13.                         /* flag address */
  14.     int far *WarmFlag = (int far *) 0x0040072;
  15.     
  16.                         /* reboot address */
  17.     void (far *reboot)(void) = (void far *) 0xFFFF0000;
  18.  
  19.     *WarmFlag = 0x1234 | flag;
  20.     (*reboot)();
  21. }
  22.